<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="viewport"
	content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=8">
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
<title>商品详情</title>
<script src="javascript/jquery.min.js"></script>
<script src="javascript/function.js"></script>
<link rel="stylesheet" href="stylesheet/style_v1.1.css">
</head>
<body>
	<div class="header-title">
		<a href="javascript:void(0);" class="fanhui" style="display:none;"> 
		<img
			src="image/tick.png" alt="">
		</a>
		<p>商品详细</p>
	</div>
	<div id="detailShow"></div>
	<script>
var goodsId='<%=request.getParameter("parms.goodsId")%>';
        $(function(){
        	queryCliffordDetail();
        });
        function queryCliffordDetail() {
   		var params = "parms.goodsId=" + goodsId;
    	$.ajax({
    				type : 'post',
    				url : 'cliffordAction!queryCliffordDetail.action',
    				async : false,
   					data : params, // 传给action的参数
    				success : function(data) {
    					if (data.result == 1) {
    						if (data.resultData.size == '0') {
    							document.getElementById("detailShow").innerHTML="";
    							alert("未获取到商品信息");
    						} else {
    							var list = data.resultData.datalist;
    							var html = "";
    							for ( var i = 0; i < list.length; i++) {
    								html += ' <div class="con padding-top50 padding-bottom50">';
    								html += '  <div class="pjq padding5">';
    								html += '  <img src="'+list[i][0].goodsMainPhoto+'" alt="">';
    								html += '    </div>';
    								html += ' <div class="work-ms">';
    								html += '  <p class="name">'+list[i][0].goodsName+'</p>';
    								if(typeof(list[i][0].goodsDes) != "undefined"){
    									html += '  <p class="shuoming">'+list[i][0].goodsDes+'</p>';
   					 			 	}
    								
    								html += '   <p class="qifu-jiage">价值 ￥<span>'+list[i][0].goodsStorePrice+'</span> 元</p>';
    								html += '  </div>';
    								html += '  <div class="work-sm">';
    								html += '  <p><span>灵犀说明：</span>'+list[i][0].goodsDetails+'</p>';
    								html += '  </div>';
    								html += '  <div class="work-xiangqing">';
    								html += '    <img src="'+list[i][0].goodsDesImg+'" alt="">';
    								html += '  </div>';
    								html += ' </div>';
    								html += ' <div class="footer padding-lr5">';
    								html += '  <a href="forwardPageParam_cliffordDetailFor.action?parms.goodsId='+list[i][0].goodsId+'" class="btn" style="margin-top: 10px"">开始灵犀</a>';
    								html += ' </div>  ';
    							}
    							document.getElementById("detailShow").innerHTML = html;
    						}
    					} else {
    						document.getElementById("detailShow").innerHTML="";
    						alert(data.msg);
    					}
    				}
    			});
    }
    </script>

</body>
</html>